package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class FromConstructor implements InsertColumnsAndSource {

    private int beginIndex;
    private int endIndex;
    private IdentifierList insertColumnList;
    private OverrideClause overrideClause;
    private ContextuallyTypedRowValueExpressionList contextuallyTypedRowValueExpressionList;

    public FromConstructor(int beginIndex,
                           IdentifierList insertColumnList,
                           OverrideClause overrideClause,
                           ContextuallyTypedRowValueExpressionList contextuallyTypedRowValueExpressionList) {
        this.beginIndex = beginIndex;
        this.endIndex = contextuallyTypedRowValueExpressionList.getEndIndex();
        this.insertColumnList = insertColumnList;
        this.overrideClause = overrideClause;
        this.contextuallyTypedRowValueExpressionList = contextuallyTypedRowValueExpressionList;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public IdentifierList getInsertColumnList() {
        return insertColumnList;
    }

    public OverrideClause getOverrideClause() {
        return overrideClause;
    }

    public ContextuallyTypedRowValueExpressionList getContextuallyTypedRowValueExpressionList() {
        return contextuallyTypedRowValueExpressionList;
    }

}
